/*
 * XML Type:  libraryType
 * Namespace: http://jugbrescia.dev.java.net/library
 * Java type: net.java.dev.jugbrescia.library.LibraryType
 *
 * Automatically generated - do not modify.
 */
package net.java.dev.jugbrescia.library.impl;
/**
 * An XML libraryType(@http://jugbrescia.dev.java.net/library).
 *
 * This is a complex type.
 */
public class LibraryTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.java.dev.jugbrescia.library.LibraryType
{
    
    public LibraryTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName BOOKS$0 = 
        new javax.xml.namespace.QName("", "books");
    
    
    /**
     * Gets the "books" element
     */
    public net.java.dev.jugbrescia.library.BooksType getBooks()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.java.dev.jugbrescia.library.BooksType target = null;
            target = (net.java.dev.jugbrescia.library.BooksType)get_store().find_element_user(BOOKS$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "books" element
     */
    public void setBooks(net.java.dev.jugbrescia.library.BooksType books)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.java.dev.jugbrescia.library.BooksType target = null;
            target = (net.java.dev.jugbrescia.library.BooksType)get_store().find_element_user(BOOKS$0, 0);
            if (target == null)
            {
                target = (net.java.dev.jugbrescia.library.BooksType)get_store().add_element_user(BOOKS$0);
            }
            target.set(books);
        }
    }
    
    /**
     * Appends and returns a new empty "books" element
     */
    public net.java.dev.jugbrescia.library.BooksType addNewBooks()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.java.dev.jugbrescia.library.BooksType target = null;
            target = (net.java.dev.jugbrescia.library.BooksType)get_store().add_element_user(BOOKS$0);
            return target;
        }
    }
}
